//
//  DoorSystemHomeLvingViewController.h
//  RONGAO
//
//  Created by wei wang on 2017/3/22.
//  Copyright © 2017年 wei wang. All rights reserved.
//

#import <UIKit/UIKit.h>
#ifdef LIB_140210
#define MAX_IMG_BUFFER_SIZE	(1920*1080*4)
#else
#define MAX_IMG_BUFFER_SIZE	(1920*1080*4)	//1280 * 720 * 4
#endif

#define PT_SPEED 8
#define PT_DELAY 1.5
#define ZOOM_MAX_SCALE 5.0
#define ZOOM_MIN_SCALE 1.0
#define degreeToRadians(x) (M_PI * (x) / 180.0)

#define INIT_RECORD_STATUS          0
#define WILL_RUNNING_RECORD_STATUS  1
#define RUNNING_RECORD_STATUS       2
#define WILL_COMPLETE_RECORD_STATUS 3
#define COMPLETE_RECORD_STATUS      4

#define CONTROL_VIEW_SNAPSHOT       1
#define CONTROL_VIEW_RECORD         2
#define CONTROL_VIEW_LISTEN         3
#define CONTROL_VIEW_TALK           4
#define CONTROL_VIEW_CRUISE_H       5
#define CONTROL_VIEW_CRUISE_V       6
#define CONTROL_VIEW_FLIP_H         10
#define CONTROL_VIEW_FLIP_V         11

#define VIEW_FULL_PAGE_NONE         0
#define VIEW_FULL_PAGE_FIRST        1
#define VIEW_FULL_PAGE_QUALITY      2
#define VIEW_FULL_PAGE_MORE         3

@interface DoorSystemHomeViewController : UIViewController<MyCameraDelegate>{
    
    NSString *directoryPath;
#ifdef LIB_140210
    unsigned short mCodecId;
    CameraShowGLView *glView;
    CVPixelBufferPoolRef mPixelBufferPool;
    CVPixelBufferRef mPixelBuffer;
    CGSize mSizePixelBuffer;
#endif
    
}

#ifdef LIB_140210
@property (nonatomic, assign) unsigned short mCodecId;
@property (nonatomic, assign) CGSize mSizePixelBuffer;
@property (nonatomic, strong) CameraShowGLView *glView;
@property CVPixelBufferPoolRef mPixelBufferPool;
@property CVPixelBufferRef mPixelBuffer;
#endif


@property NSInteger recordStatus;

@property (nonatomic, retain) NSArray *quality_list;
@property (nonatomic, retain) NSArray *flip_list;
@property (nonatomic) NSInteger qualityOrigValue;
@property (nonatomic) NSInteger qualityNewValue;
@property (nonatomic) NSInteger flipOrigValue;
@property (nonatomic) NSInteger flipNewValue;

@property (nonatomic) NSInteger warnOrigValue;
@property (nonatomic) NSInteger warnNewValue;

@property (nonatomic) NSInteger doorPasswordMode;
@property (nonatomic, retain) NSString *doorPassword;
@property (strong, nonatomic) IBOutlet UIView *portraitView;
@property (strong, nonatomic) IBOutlet UIView *landscapeView;
@property (weak, nonatomic) IBOutlet Monitor *monitorPortrait;
@property (weak, nonatomic) IBOutlet Monitor *monitorLandscape;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *loadingViewPortrait;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *loadingViewLandscape;

@property (weak, nonatomic) IBOutlet UIButton *landrecorderButton;
@property (weak, nonatomic) IBOutlet UIButton *landalarmButton;
@property (weak, nonatomic) IBOutlet UIButton *landlistenButton;

@property (weak, nonatomic) IBOutlet UIButton *portraitrecorderButton;
@property (weak, nonatomic) IBOutlet UIButton *portraitalarmButton;
@property (weak, nonatomic) IBOutlet UIButton *portraitlistenButton;

@property (weak, nonatomic) IBOutlet UIView *containView;
@property (weak, nonatomic) IBOutlet UIButton *HUDBtn;

@property (weak, nonatomic) IBOutlet UIView *collectionView;
@property (weak, nonatomic) IBOutlet UIView *HUDView;

@end
